<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.1.1.js"></script>
</head>

<body>
    <p>手机号码仅限13.14.15.17.18开头的11位数字</p>
    <input type="text" name="" id="">
    <button>提交</button>
    <span></span>
</body>
<script>
    $(function () {

        $('button').click(function () {
            let inputVal = $('input').val();
            let shiyi = /^1(?=[34578])\d{10}$/g
            // console.log(inputVal.match(shiyi))
            let tf = shiyi.test(inputVal)
            if (tf) {
                $('span').text('正确')
            } else {
                $('span').text('错误')
            }
            $('input').val('');
        })
    })
</script>

</html>